import request from '@/utils/request'

export function saveData(data) {
  return request({
    url: '/catalogRelation/save',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: '/catalogRelation/edit',
    method: 'post',
    data
  })
}

export function updateState(data) {
  return request({
    url: '/catalogRelation/updateState',
    method: 'post',
    params: data
  })
}

export function getInfo(data) {
  return request({
    url: '/catalogRelation/getInfo',
    method: 'get',
    params: data
  })
}

export function copyData(data) {
  return request({
    url: '/catalogRelation/copy',
    method: 'post',
    data
  })
}

export function getTreeList(data) {
  return request({
    url: '/catalogRelation/getTreeList',
    method: 'post',
    params: data
  })
}

export function getInitialLoading(data) {
  return request({
    url: '/catalogRelation/getInitialLoading',
    method: 'post',
    params: data
  })
}

export function getAgainLoading(data) {
  return request({
    url: '/catalogRelation/getAgainLoading',
    method: 'post',
    params: data
  })
}

export function getGGLeafNode(data) {
  return request({
    url: '/catalogRelation/getGGLeafNode',
    method: 'get',
    params: data
  })
}

export function getAllLeafNode(data) {
  return request({
    url: '/catalogRelation/getAllLeafNode',
    method: 'get',
    params: data
  })
}
